package com.atos.smp.business.impl;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.atos.smp.beans.Collaborator;
import com.atos.smp.business.CollaboratorManager;
import com.atos.smp.dao.CollaboratorDao;
import com.atos.smp.beans.Process;

public class CollaboratorManagerImpl implements CollaboratorManager,Serializable {

	private CollaboratorDao collaboratorDao;

	public CollaboratorManagerImpl(CollaboratorDao dao) {
		this.collaboratorDao = dao;
	}

	public CollaboratorDao getCollaboratorDao() {
		return collaboratorDao;
	}

	public void setCollaboratorDao(CollaboratorDao collaboratorDao) {
		this.collaboratorDao = collaboratorDao;
	}

	public void save(Collaborator collaborator) {
		collaboratorDao.save(collaborator);
	}

	public void update(Collaborator collaborator) {
		collaboratorDao.update(collaborator);
	}

	public void delete(Collaborator collaborator) {
		collaboratorDao.delete(collaborator);
	}

	public Collaborator findCollaboratorByDas(String das) {
		return collaboratorDao.findCollaboratorByDas(das);
	}

	public List<Collaborator> findAllCollaborators() {
		
		return collaboratorDao.findAllCollaborators();
	}

	@Override
	public List<Process> findAllProcess() {
		return collaboratorDao.findAllProcess();
	}

	@Override
	public List<Process> findProcessByDate(Date date) {
		
		return collaboratorDao.findProcessByDate(date);
	}

	@Override
	public List<Process> findProcessByName(String name) {
		
		return collaboratorDao.findProcessByName(name);
	}

	@Override
	public List<Collaborator> findAllManagers() {
		return collaboratorDao.findAllManagers();
	}

	@Override
	public List<Collaborator> findAllProjectManagers() {
		return collaboratorDao.findAllProjectManagers();
	}

}
